# 冒泡排序
def bubbleSort(arr):
    temp = 0
    flag = False
    for i in range(len(arr)):
        for j in range(len(arr) - i):
            if arr[j] > arr[j + 1]:
                flag = True
                temp = arr[j]
                arr[j] = arr[j + 1]
                arr[j + 1] = temp
        if flag:
            flag = False
        else:
            break
